package demo3;

interface IShape{
    public abstract void draw();
    default public void func(){
        System.out.println("asdffee");

    }
//    public static void funcStatic(){
//        System.out.println("fafa");
//    }
}

class  Rect implements IShape{
    @Override
    public void draw(){
        System.out.println("♦");
    }

    @Override
    public void func(){
        System.out.println("重写接口中的默认方法");
    }
}

class Flower implements IShape{
    @Override
    public void draw(){
        System.out.println("❀");
    }

}

public class Test {

    public static void drawMap(IShape ishape){
        ishape.draw();
    }

    public static void main(String[] args) {
        drawMap(new Rect());
        drawMap(new Flower());
    }
    public static void main1(String[] args) {
        IShape ishape = new Rect();
        ishape.draw();

    }
}
